export default {
	TablePageSizes: [10],
	TablePageSize: 10,
	TableLayout: "total, sizes, prev, pager, next, jumper",
	TableMaxHeight: '536px',
	Tablestripe: true,
	TableBackground: true,
	FormSize: 'small',
	PaginationBackground: true,
	TextMaxLengthShort: 50,
	TextMaxLength: 100,
	TextMaxLengthLong: 200,
	// 弹窗点击 空白地方 是否关闭弹窗/^\w+$/
	DialogModalClick: false,
	defaultTime:{
		daterange: ['00:00:00', '23:59:59'],
		datetimerange: ['00:00:00', '23:59:59']
	},
	pickerOptions: {
		date:{
			// disabledDate(time) {
			// 	return time.getTime() > Date.now();
			// },
			shortcuts: [
				{
					text: '今天',
					onClick(picker) {
						picker.$emit('pick', new Date());
					}
				},
				{
					text: '昨天',
					onClick(picker) {
						const date = new Date();
						date.setTime(date.getTime() - 3600 * 1000 * 24);
						picker.$emit('pick', date);
					}
				},
				{
					text: '一周前',
					onClick(picker) {
						const date = new Date();
						date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
						picker.$emit('pick', date);
					}
				}
			]
		},
		datetime: {
			/*	shortcuts: [{
          text: '今天',
          onClick(picker) {
            picker.$emit('pick', new Date());
          }
        },
        {
          text: '昨天',
          onClick(picker) {
            const date = new Date();
            date.setTime(date.getTime() - 3600 * 1000 * 24);
            picker.$emit('pick', date);
          }
        }, {
          text: '一周前',
          onClick(picker) {
            const date = new Date();
            date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
            picker.$emit('pick', date);
          }
        }
        ]*/
		},
		daterange:{
			shortcuts: [{
				text: '今天',
				onClick(picker) {
					const day = 3600 * 1000 * 24;
					const end = new Date(new Date().toLocaleDateString());
					const start = new Date(new Date().toLocaleDateString());
					end.setTime(end.getTime() + day - 1);
					picker.$emit('pick', [start, end]);
				}
			},{
				text: '最近一周',
				onClick(picker) {
					const day = 3600 * 1000 * 24;
					const end = new Date(new Date().toLocaleDateString());
					const start = new Date(new Date().toLocaleDateString());
					start.setTime(start.getTime() - day * 7);
					end.setTime(end.getTime() + day - 1);
					picker.$emit('pick', [start, end]);
				}
			}, {
				text: '最近一个月',
				onClick(picker) {
					const day = 3600 * 1000 * 24;
					const end = new Date(new Date().toLocaleDateString());
					const start = new Date(new Date().toLocaleDateString());
					start.setTime(start.getTime() - day * 30);
					end.setTime(end.getTime() + day - 1);
					picker.$emit('pick', [start, end]);
				}
			}, {
				text: '最近三个月',
				onClick(picker) {
					const day = 3600 * 1000 * 24;
					const end = new Date(new Date().toLocaleDateString());
					const start = new Date(new Date().toLocaleDateString());
					start.setTime(start.getTime() - day * 90);
					end.setTime(end.getTime() + day - 1);
					picker.$emit('pick', [start, end]);
				}
			}]
		},
		datetimerange:{
			shortcuts: [{
				text: '今天',
				onClick(picker) {
					const day = 3600 * 1000 * 24;
					const end = new Date(new Date().toLocaleDateString());
					const start = new Date(new Date().toLocaleDateString());
					end.setTime(end.getTime() + day - 1);
					picker.$emit('pick', [start, end]);
				}
			},{
				text: '最近一周',
				onClick(picker) {
					const day = 3600 * 1000 * 24;
					const end = new Date(new Date().toLocaleDateString());
					const start = new Date(new Date().toLocaleDateString());
					start.setTime(start.getTime() - day * 7);
					end.setTime(end.getTime() + day - 1);
					picker.$emit('pick', [start, end]);
				}
			}, {
				text: '最近一个月',
				onClick(picker) {
					const day = 3600 * 1000 * 24;
					const end = new Date(new Date().toLocaleDateString());
					const start = new Date(new Date().toLocaleDateString());
					start.setTime(start.getTime() - day * 30);
					end.setTime(end.getTime() + day - 1);
					picker.$emit('pick', [start, end]);
				}
			}, {
				text: '最近三个月',
				onClick(picker) {
					const day = 3600 * 1000 * 24;
					const end = new Date(new Date().toLocaleDateString());
					const start = new Date(new Date().toLocaleDateString());
					start.setTime(start.getTime() - day * 90);
					end.setTime(end.getTime() + day - 1);
					picker.$emit('pick', [start, end]);
				}
			}]
		},
	}
}
